/*
package com.woniuxy.moneyapp.common.exception;

import com.woniuxy.commons.exception.MyException;
import com.woniuxy.commons.util.Result;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.MethodArgumentNotValidException;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
@Slf4j
public class GgglobalException {

    @ExceptionHandler(MyException.class)
    public Result handleWoniuxyException(MyException e) {
        log.error("出现异常", e);
        return new Result().setCode(e.getCode()).setMsg(e.getMessage());
    }

    @ExceptionHandler(MethodArgumentNotValidException.class)
    public Result handleBindingException(MethodArgumentNotValidException e){
        log.error("出现异常",e);
        return new Result().setCode(500).setMsg(e.getMessage());
    }


    @ExceptionHandler(Exception.class)
    public Result handleException(Exception e) {
        log.error("出现异常", e);
        return new Result().setCode(500).setMsg(e.getMessage());
    }

}
*/
